<template>
  <div class="pointer" v-if="on" @click="hideOn">
    <slot name="on"></slot>
  </div>
  <div class="pointer" v-else @click="showOn">
    <slot name="off"></slot>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
@Component({
  components: {},
})
export default class SwitchContent extends Vue {
  on = true;

  showOn() {
    this.on = true;
    this.$emit("click", this.on);
  }

  hideOn() {
    this.on = false;
    this.$emit("click", this.on);
  }
}
</script>
